/*************************************************************************
> File Name: 007.c
> Author: icebear
> Mail: 3322366195@qq.com
> Created Time: 2023-07-24 16:47:44
> Description: 二维数组乘法
************************************************************************/

#include <stdio.h>

int main(int argc, char const *argv[])
{
    int arr1[3][3];
    int arr2[3][3];
    int result[3][3];
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            arr1[i][j] = i * 3 + j;
            arr2[i][j] = i * 3 + j;
        }
    }
    printf("the arr1 is:\t the arr2 is:\n");
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            printf("%3d ", arr1[i][j]);
        }
        printf("\t\t");
        for (int j = 0; j < 3; j++)
        {
            printf("%3d ", arr2[i][j]);
        }
        printf("\n");
    }
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            result[i][j] = arr1[i][j] * arr2[i][j];
        }
    }
    printf("the reslut arr is:\n");
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            printf("%3d ", result[i][j]);
        }
        printf("\n");
    }

    return 0;
}
